Fix pixbuf leaks in non-WinXP rendering paths. From Daniel Atallah
authorDominic Lachowicz <domlachowicz@gmail.com>
Thu, 19 Apr 2007 14:42:12 +0000 (14:42 +0000)
committerDom Lachowicz <doml@src.gnome.org>
Thu, 19 Apr 2007 14:42:12 +0000 (14:42 +0000)
2007-04-19  Dominic Lachowicz <domlachowicz@gmail.com>

        * modules/engines/ms-windows/msw_style.c: Fix pixbuf leaks in
        non-WinXP rendering paths. From Daniel Atallah (#403470)

svn path=/trunk/; revision=17613

ChangeLog
modules/engines/ms-windows/msw_style.c

index c35da9a24eb0eb1e0bbd754d98787f0943967f30..5c2a15e78023bc426b501e86ccb722c1a9bc9389 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-04-19  Dominic Lachowicz <domlachowicz@gmail.com>
+
+       * modules/engines/ms-windows/msw_style.c: Fix pixbuf leaks in
+       non-WinXP rendering paths. From Daniel Atallah (#403470)
+       
 2007-04-19  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkicontheme.h:
index 5fe0c2029aff6298d927238beedf51ee3b521279..bb149d86f1d9f5909332a6688065b3474e764e7a 100755 (executable)
@@ -2497,6 +2497,9 @@ draw_extension (GtkStyle * style,
                    HDC dc;
                    gint32 aPosition;
 
+                  if (real_gap_side == GTK_POS_BOTTOM)
+                      g_object_unref (pixmap);
+
                    dc = get_window_dc(style, window, state_type, x, y, width, height, &rect);
 
                    if (real_gap_side == GTK_POS_TOP)
@@ -2519,6 +2522,9 @@ draw_extension (GtkStyle * style,
                    release_window_dc (style, window, state_type);
                     return;
                }
+
+               if (real_gap_side == GTK_POS_LEFT || real_gap_side == GTK_POS_RIGHT)
+                   g_object_unref (pixmap);
        }
     parent_class->draw_extension
        (style, window, state_type, shadow_type, area, widget, detail,